package com.shj.em.biz.company.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.Version;
import com.shj.em.base.entity.BaseEntity;



import com.baomidou.mybatisplus.annotations.Version;

import com.shj.em.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 联系人信息
 * </p>
 *
 * @author Shen Huang Jian
 * @since 2018-07-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("oa_contact")
public class Contact extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Long companyId;

    /**
     * 联系人姓名
     */
    private String name;

    /**
     * 手机
     */
    private String mobile;

    /**
     * 电话
     */
    private String phone;

    private String email;

    private String qq;

    public String getContactNo(){
        return StringUtils.isNotBlank(mobile) ? mobile : phone;
    }

}
